<?PHP

// MinBS - Minimalist Bloggin System 
// Developed by Juliano "tibone" Flores
// http://code.google.com/p/minbs


// Gets the information from the configuration file
require_once('config.php');
require_once('ps_pagination/ps_pagination.php');

$minbs_version = "v.1.0.0"; // MinBS Current Version

// Connects to the mysql database 
$msg[0] = "Error : Cannot connect to the database";
$msg[1] = "Error : Cannot select the database";

$connection = mysql_connect("$db_server","$db_user","$db_pass") or die($msg[0]);
mysql_select_db("$db_name") or die($msg[1]);

// Query to get the settings from the database
$query_settings = "SELECT * FROM minbs_settings where id = '1'";
$settings = mysql_query($query_settings, $connection);


// Query to get posts from the database
$query = "SELECT * FROM minbs_blog ORDER BY date DESC";
// $results = mysql_query($query,$connection);
$pager = new PS_Pagination($connection, $query, 8, 3, '');
$results = $pager->paginate();

// Query to retrieve the post categories from the database
$query_cats = "SELECT * FROM minbs_categories";
$categories = mysql_query($query_cats, $connection);


?>



